package com.study.s12.binarytree;

public class TestBinaryTree {
	
	public static void main(String[] args) {
		BinaryTree tree = new BinaryTree();
		tree.insert(10);
		tree.insert(20);
		tree.insert(15);
		tree.insert(3);
		tree.insert(4);
		tree.insert(90);
//		tree.insert(9);
//		tree.insert(2);
		System.out.println("打印二叉树");
		tree.print();
		
		System.out.println("前序遍历");
		tree.frontOrder(tree.root);
		System.out.println();
		System.out.println("中序遍历");
		tree.inOrder(tree.root);
		System.out.println();
		System.out.println("后序遍历");
		tree.endOrder(tree.root);
	}
}
